#include <stddef.h>
#include "includes/myqueue.h"

myqueue *myqueue_create(int c) {
    return mylist_create(c, NULL);
}

int myqueue_push(myqueue *q, void *d) {
    mylist_append(q, d);
}

void *myqueue_pop(myqueue *q) {
    if(MYLIST_IS_EMPTY(q)) return NULL;
    mylnode *first = q->head->next;
    mylist_delete(q, first);
    return first->data;
}
